package com.yxinsur.imc.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.yxinsur.imc.common.annotation.Excel;
import com.yxinsur.imc.common.core.domain.BaseImcEntity;
import lombok.Data;
import lombok.ToString;
import org.json.JSONArray;
import org.json.JSONObject;
import springfox.documentation.spring.web.json.Json;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 佣金报主对象 imc_comm_details
 *
 * @author imc
 * @date 2021-05-25
 */
@Data
@ToString
@TableName(autoResultMap = true)
public class ImcCommDetails extends BaseImcEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 佣金报表主表
     */
    @Excel(name = "佣金报表主表")
    private Long commId;

    /**
     * 代理人id
     */
    @Excel(name = "代理人id")
    private Long brokerId;

    /**
     * 代理人当前团队所在机构id
     */
    @Excel(name = "代理人当前团队所在机构id")
    private Long orgId;

    /**
     * 代理人职级数组ids[]
     */
    @Excel(name = "代理人职级数组ids[]")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private String brokerRoleIds;

    /**
     * 代理人所辖团队id(root)
     */
    @Excel(name = "代理人所辖团队id(root)")
    private Long teamRootId;

    /**
     * 代理人所在团队id
     */
    @Excel(name = "代理人所在团队id")
    private Long teamId;

    /**
     * 1代推荐人id 直接推荐人
     */
    @Excel(name = "1代推荐人id 直接推荐人")
    private Long recommenderId;

    /**
     * 2代推荐人id 间接推荐人
     */
    @Excel(name = "2代推荐人id 间接推荐人")
    private Long indirectRecommenderId;

    /**
     * 首期佣金-保单年度=1-imc_order_risk_id列表ids[]
     * pay_year<>1 手续费已结，佣金未发，时间条件[基本法结算口径]
     */
    @Excel(name = "首期佣金-保单年度=1-imc_order_risk_id列表ids[] pay_year<>1 手续费已结，佣金未发，时间条件[基本法结算口径]")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private String firstOrderRiskIds;

    /**
     * 续期佣金列表-保单年度>1-imc_order_risk_idid[]
     * pay_year<>1 手续费已结，佣金未发，时间条件[实收日期<=所选结算月]
     */
    @Excel(name = "续期佣金列表-保单年度>1-imc_order_risk_idid[] pay_year<>1 手续费已结，佣金未发，时间条件[实收日期<=所选结算月]")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private String renewalOrderRiskIds;

    /**
     * 首期保费
     */
    @Excel(name = "首期保费")
    private BigDecimal firstPrem;

    /**
     * 首期标保
     */
    @Excel(name = "首期标保")
    private BigDecimal standPrem;

    /**
     * 首期直佣
     */
    @Excel(name = "首期直佣")
    private BigDecimal firstComm;

    /**
     * 续期规保
     */
    @Excel(name = "续期规保")
    private BigDecimal renewalPrem;

    /**
     * 续期直佣
     */
    @Excel(name = "续期直佣")
    private BigDecimal renewalComm;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private String createId;

    /**
     * 修改人
     */
    @Excel(name = "修改人")
    private String updateId;

    /**
     * 逻辑删除
     */
    @Excel(name = "逻辑删除")
    private String isDeleted;

    /**
     * 租户id,一个租户id唯一对一个机构id（默认机构id为根节点id暨法人机构）
     */
    @Excel(name = "租户id,一个租户id唯一对一个机构id", readConverterExp = "默=认机构id为根节点id暨法人机构")
    private Long tenantId;

    @TableField(value = "profit_1")
    private BigDecimal profit1;
    @TableField(value = "profit_2")
    private BigDecimal profit2;
    @TableField(value = "profit_3")
    private BigDecimal profit3;
    @TableField(value = "profit_4")
    private BigDecimal profit4;
    @TableField(value = "profit_5")
    private BigDecimal profit5;
    @TableField(value = "profit_6")
    private BigDecimal profit6;
    @TableField(value = "profit_7")
    private BigDecimal profit7;
    @TableField(value = "profit_8")
    private BigDecimal profit8;
    @TableField(value = "profit_9")
    private BigDecimal profit9;
    @TableField(value = "profit_10")
    private BigDecimal profit10;
    @TableField(value = "profit_11")
    private BigDecimal profit11;
    @TableField(value = "profit_12")
    private BigDecimal profit12;
    @TableField(value = "profit_13")
    private BigDecimal profit13;
    @TableField(value = "profit_14")
    private BigDecimal profit14;
    @TableField(value = "profit_15")
    private BigDecimal profit15;


}
